import Vue from 'vue'
import App from './App.vue'
import axios from 'axios'
import router from './router'
// Element 组件库
import './plugins/element.js'
// 全局样式表
import './assets/css/global.css'
import './assets/font/iconfont.css'
// 树形控件
import ZkTable from 'vue-table-with-tree-grid'

Vue.component(ZkTable.name, ZkTable)


axios.defaults.baseURL = 'https://lianghj.top:8888/api/private/v1/'
// 在 axios 拦截器中添加 token 令牌 
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token');
  return config;
})
Vue.prototype.$http = axios

Vue.config.productionTip = false


new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
